<template>
  <div>
    <van-overlay z-index="2222" :show="show" :class="{bg:bgcolor}" @click="loadingshow = false">
      <div class="wrapper" @click="loadingshow = false">
        <van-loading color="#1989fa" size="24px" vertical
          >加载中...</van-loading
        >
      </div>
    </van-overlay>
  </div>
</template>

<script>
export default {
  name:'Overlay',
  props: {
    show: { type: Boolean, defaults: false },
    bgcolor: { type: Boolean, defaults: false },
  },
  setup() {
    
    return {  };
  },
};
</script>

<style lang="scss" scoped>
.wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
}
.bg{
  background: #fff;
}
</style>